import { createSlice } from "@reduxjs/toolkit";

const loadingStore=createSlice({
    name:"loadingStore",
    initialState:{
        isLoading:false
    },
    reducers:{
        setLoading:(state,action)=>{
            state.isLoading=action.payload
        }
    }
})

const {setLoading} = loadingStore.actions
const loadingreducer=loadingStore.reducer
export {setLoading}
export default loadingreducer